<template>
  <div style="position: relative;"> 
    <mt-header fixed title="个人中心">
    </mt-header>
    <div style="height:40px;"></div>   

    <div v-show="loading" class="loading-center" ref='load'><mt-spinner :type="3" color="#999" :size="20"></mt-spinner>正在加载…</div>
    <div v-show="!loading">      
      <div class="my-field" style="margin-top: 0;">
        <div class="my-field-img">
          <img src="@/assets/img/head/male-2.png" />
          {{obj.nickName}}
        </div>
      </div>
      <div class="my-field">
        <div class="my-field-item" @click="$router.push('/my/info')">
          <span class="my-field-item-l"><b class="icon_con"><i style="color:#00a0e9;" class="fa fa-user-circle"></i></b>我的资料</span>
          <div class="my-field-item-r"></div>
          <i class="fa fa-angle-right"></i>
        </div> 
        <div class="my-field-item" @click="$router.push('/my/message')">
          <span class="my-field-item-l"><b class="icon_con"><i style="color:#3db231;" class="fa fa-commenting"></i></b>我的消息</span>
          <div class="my-field-item-r">
            <i class="red-tag">2</i>
          </div>
          <i class="fa fa-angle-right"></i>
        </div>
        <!-- <div class="my-field-item" @click="$router.push('/my/partner')">
          <span class="my-field-item-l"><b class="icon_con"><i style="color:#f64f14; font-size:22px;" class="my-icon-member2"></i></b>我的搭档</span>
          <div class="my-field-item-r"></div>
          <i class="fa fa-angle-right"></i>
        </div> -->
      </div>

      <div class="my-field">
        <div class="my-field-item" @click="$router.push('/my/enroll')">
          <span class="my-field-item-l"><b class="icon_con"><i style="color:#ff3300; font-size:22px;" class="fa fa-ticket"></i></b>我的报名</span>
          <router-link class="my-field-item-r" to="/my/match"></router-link>
          <i class="fa fa-angle-right"></i>
        </div> 
        <div class="my-field-item" @click="$router.push('/my/match')">
          <span class="my-field-item-l"><b class="icon_con"><i style="color:#fdb300; font-size:22px;" class="my-icon-cup2"></i></b>我的比赛</span>
          <router-link class="my-field-item-r" to="/my/match"></router-link>
          <i class="fa fa-angle-right"></i>
        </div> 
        <div class="my-field-item" @click="$router.push('/my/club')">
          <span class="my-field-item-l"><b class="icon_con"><i style="color:#8b7df2; font-size:22px;" class="my-icon-club2"></i></b>我的俱乐部</span>
          <div class="my-field-item-r"></div>
          <i class="fa fa-angle-right"></i>
        </div>
        <div class="my-field-item" @click="$router.push('/my/certification')">
          <span class="my-field-item-l"><b class="icon_con"><i style="color:#25a521; font-size:18px;" class="fa fa-id-card-o"></i></b>实名认证</span>
          <div class="my-field-item-r"></div>
          <i class="fa fa-angle-right"></i>
        </div>
        <div class="my-field-item" @click="$router.push('/my/safe')">
          <span class="my-field-item-l"><b class="icon_con"><i style="color:#00a0e9;" class="fa fa-cog"></i></b>安全设置</span>
          <div class="my-field-item-r"></div>
          <i class="fa fa-angle-right"></i>
        </div>
      </div>
      <router-link style="display: flex; margin: 0 10px;" to="/login"><mt-button style="flex:1;" type="danger">退出</mt-button></router-link>
    </div>
    <div style="height:60px;"></div>
    <main-nav active='我'></main-nav> 
  </div>
</template>

<script>
import mainNav from '@/components/mainNav'
export default {
  components:{
    mainNav
  },
  data () {
    return {
      obj: {},
      loading:false,
      popupVisible:false
    }
  },
  mounted(){
    this.loading = true; 
    this.$refs.load.style.height = (document.documentElement.clientHeight - 100) + "px";

    this.loading = false; 
    this.obj = {
      "headSrc":"",
      "loginName":"xcld",
      "realName":"张无忌",
      "sex":"male",
      "idCard":"4304331999053130254",
      "nickName":"明教教主",
      "mobile":"1351234567800",
      "email":"1351234567800@qq.com",
      "club": 5
    }
    /*this.axios.get(this._site + 'my/details', {
      params: { id:this.$store.state.userId }          
    }).then(response => {
      var res = response.data; 
      this.loading = false; 
      if(res.status == 1){        
        this.obj = res.data;
      }else{ 
        this.$toast({message: '加载失败'});
      }
    }).catch(error => {
      this.loading = false;
      this.$toast({message: '加载失败'});
    });*/
    
  }
}
</script>
